mm-trans

Section: Misc. Reference Manual Pages (l)
Updated: 8 May 1989
Index Return to Main Contents
 

NAME

mm-trans - transform a DEC20 or an SRI UNIX-MM mail.txt into a Unix one  

SYNTAX

mm-trans infile outfile  

DESCRIPTION

mm-trans transforms a mail.txt format file, infile, brought over from a DEC20 or an SRI UNIX-MM mail.txt, into a file that can be read with the mm(1) program on a Unix machine. With no second argument, the new file is written to standard output, but this is discouraged. Typically, infile would have been brought over with the ftp(1c) program, though it could also have been transferred from a DEC20 to a floppy disk with the kermit(1c) program, and then transferred to a Unix machine using kermit again.

The mm-trans program is necessary because end of line on a DEC20 is stored as a carriage return and a line feed, whereas on a Unix machine it is just a linefeed. mail.txt format counts on having an internal byte count for each message. ftp(1c) and kermit(1c) remove the carriage returns when transferring files to the Unix machine (making each message shorter), but do not update the byte counts. The mm-trans program fixes the internal byte counts.

If you have been using SRI UNIX-MM, then the byte count used by SRI MM does not equal the actual number of bytes in the text of the message. Columbia MM requires the byte count to be exact.  

EXAMPLES

If you had just transferred your mail.txt from a DEC20 to a Unix machine, placing it in the file mail-20.txt in your current directory, you would type

       mm-trans mail-20.txt mail-unix.txt

and then you could read mail-unix.txt with mm(l).

If you have been using SRI UNIX-MM, then type:

       mm-trans mail.txt cmail.txt

and then you could read cmail.txt with mm(1).

 

ERROR HANDLING

The mm-trans program is now rather robust. Nulls, which were used as padding in older versions of DEC-20 MM, are converted to blanks. If the internal byte counts are not equal to the actual byte count of the message plus the number of lines in the message, mm-trans will print a message like

       WARNING: message length error in message #3, backtracking...

and will rescan each line of the message looking for a real MM header, continuing through the file until it finds one. Warnings most often occur in cases where a message contained line feeds or carriage returns that were not part of a carriage return/line feed pair. While you should check messages where warnings occur for accuracy, it is unlikely that the result of backtracking will be erroneous.  

SEE ALSO

mm(l), ftp(1c), kermit(1c), any consultant  

BUGS

mm-trans used to write only to standard output, but this encouraged users to do

       mm-trans mail.txt > mail.txt

which causes the shell to truncate the file before mm-trans has a chance to read it, and loses all the data.

If the message length is incorrect, and an mm-header is embedded in that message, the correction routine will treat the embedded message as a new one. However, this should be extremely rare.

The conversion algorithm could be optimized further.  

AUTHORS

mm-trans, originally known as simply transform, was written as part of the Columbia-MM project, by Melissa Metz, in order to allow users to move from Columbia's DEC20s with their mail files. Michael A. Cooper from University of Southern California added modifications so transform would be robust enough to convert SRI UNIX-MM files as well to help convert his users. Bill Yeager from Stanford pointed out some bugs. Jim Lichtenstein and Sam Gassel from University of Chicago made it smart enough to backtrack if it can't find a good header.  

COPYRIGHT

mm and mm-trans are Copyright (c) 1986, 1990 by The Trustees of Columbia University in the City of New York. Permission is granted to any individual or institution to use, copy, or redistribute this software so long as it is not sold for profit, provided this copyright notice is retained.


 

Index

NAME
SYNTAX
DESCRIPTION
EXAMPLES
ERROR HANDLING
SEE ALSO
BUGS
AUTHORS
COPYRIGHT

This document was created by man2html, using the manual pages.
Time: 06:48:05 GMT, May 19, 2025